#include <iostream>
#include "status.h"
#include "string_cus.h"
using namespace std;

int main()
{
	String str("hahahhaha");
	//test StrLength()
	cout << str.StrLength() << endl;
	//test <<
	cout << str << endl;
	//test StrCopy()
	String hei("heihei");
	str.StrCopy(hei);
	cout << str << endl;
	//test StrCompare()
	String cmp("hahahhahah");
	cout << str.StrCompare(cmp) << endl;
	//test Concat()
	str.Concat(hei, cmp);
	cout << str << endl;
	//test SubString()
	String sub;
	str.SubString(sub, 1, 4);
	cout << sub << endl;
	//test Index()
	String children("hah");
	cout << str.Index(children, 7) << endl;
	//test StrInsert()
	str.StrInsert(0, children);
	cout << str << endl;
	str.StrInsert(8, children);
	cout << str << endl;
	//test StrDelete()
	str.StrDelete(8, 3);
	cout << str << endl;
	//test Replace()
	String old("ha");
	String ne("&&&");
	str.Replace(old, ne);
	cout << str << endl;
	str.Replace(ne, old);
	cout << str << endl;

	system("pause");
}

